package com.nineclock.attendance.utils;

import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;

import java.util.List;

public class MyColumnStyle extends AbstractColumnWidthStyleStrategy {

    @Override
    protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<CellData> cellDataList,
                                  org.apache.poi.ss.usermodel.Cell cell,
                                  Head head, Integer relativeRowIndex, Boolean isHead) {
        writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), 4500);
    }
}